import requests
import json

url = 'https://libretranslate.com/'

# body = {
    # 'q': 'Apple',
    # 'source': 'en',
    # 'target': 'ru'
# }

body = {
	'method': "POST",
	'body': {
		'q': "The method is not allowed for the requested URL.e.",
		'source': "en",
		'target': "ru"
	},
	'headers': { "Content-Type": "application/json" }
}


json = json.dumps(body)

response = requests.get(url, json=json)

print(response.text)
